
function resize() {
    var width = document.body.offsetWidth || document.documentElement.offsetWidth;
    var rem = width / 30;
    // if (rem > 100) rem = 100;
    document.documentElement.style.fontSize = rem + 'px'
}
resize();
window.onresize = resize;